package com.swinw.asumall.product.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;

import com.swinw.common.vaild.AddGroup;
import com.swinw.common.vaild.IsNumber;
import com.swinw.common.vaild.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.*;

/**
 * 属性分组
 * 
 * @author 罗义华
 * @email 2407550328@qq.com
 * @date 2020-10-04 12:33:33
 */
@Data
@TableName("pms_attr_group")
public class AttrGroupEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 分组id
	 */
	@NotBlank(message = "修改属性组信息，属性组ID不能为空",groups = {UpdateGroup.class})
	@TableId
	private Long attrGroupId;
	/**
	 * 组名
	 */
	@NotBlank(message = "属性分组名必须提交",groups = {AddGroup.class})
	private String attrGroupName;
	/**
	 * 排序
	 */
	@Min(value = 0,message = "排序字段的值必须大于等于0",groups = {AddGroup.class, UpdateGroup.class})
	private Integer sort;
	/**
	 * 描述
	 */
	@NotBlank(message = "描述信息不能为空",groups = {AddGroup.class})
	private String descript;
	/**
	 * 组图标
	 */
	private String icon;
	/**
	 * 所属分类id
	 */
	@IsNumber(message = "传递的参数必须为数值类型",groups = {AddGroup.class})
	private Long catelogId;

	/**
	 * 标注当前的字段不是数据库字段
	 */
	@TableField(exist = false)
	private Long[] catelogPath;

}
